function mTab =Net_taskGeneration(netDefinitionMatrix, taskNr,minExecTime,maxExecTime)
%NET_TASKGENERATION Summary of this function goes here
%   Detailed explanation goes here

machineNr = size(netDefinitionMatrix,1);
mTab = zeros(machineNr,machineNr,taskNr);
    
for i=1:taskNr
    taskMatrix = zeros(machineNr,machineNr);
    
    for j=1:machineNr
        execOrder = zeros(1,machineNr);
        machineNrVector = find(netDefinitionMatrix(j,:)~=0);
        enableMachines = size(machineNr,2);
        if enableMachines > 0
            selectedMachineNr = randi([1,enableMachines]);
            if selectedMachineNr > 0
                for k=1:selectedMachineNr
                    pickMachine = randi([1,length(machineNrVector)]);
                    execOrder(k) = machineNrVector(pickMachine);
                    machineNrVector(pickMachine) = [];
                end
            taskMatrix(j,execOrder(selectedMachineNr)) = randi([minExecTime,maxExecTime]);
            end  
        end
    end
    mTab(:,:,i) = taskMatrix; 
end

clearvars taskNr machineNr minExecTime maxExecTime taskMatrix machineNrVector execOrder i j pickMachine
end

%TODO

